<?php

namespace app\api\controller\cms;
use app\api\service\cms\PayService;
use think\Request;

class Pay
{

    protected $Service;
    public function __construct()
    {
        $this->Service = PayService::getInstance();
    }

    public function notify(){
        $this->Service->notify();
    }


    /**
     * @auth('支付二维码','微信支付')
     * @param Request $request
     * @param('pay','支付金额','require|number')
     * @return \think\response\Json
     */
    public function payQrcode(Request $request){
        $params = $request->get();
        $qr = $this->Service->payQrcode($params);
        return writeJson(201, $qr, '数据');
    }

}
